<template>
  <div class="main">
    <div class="box">
      <h1>PROOF OF GROWTH</h1>
      <div class="box-detail">
        SmartPot enables anyone to join the intelligent planting and decentralized
        ecosystem.
      </div>
    </div>
    <div class="section">
      <el-input v-model="input1" class="input" size="large" placeholder="Stay Updated" :suffix-icon="Right" />
      <div class="container">
        <div class="container-item">
          <span>Smart</span>
          <span>Create a sustainable, green global smart planting ecosystem using Web3 and
            decentralized physical infrastructure network (DePIN) technology.</span>
        </div>
        <div class="container-item">
          <span>Pot</span>
          <span>Leverage decentralized smart hardware and data exchange to redefine
            planting with intelligent, eco-friendly solutions while unlocking data
            value through a decentralized platform.</span>
        </div>
      </div>
    </div>
    <div class="video">
      <video v-if="startVideo" src="" class="video-content"></video>
      <img v-else class="video-content" src="@/assets/images/video_replace.png" alt="">
      <div class="video-btn"></div>
      <div class="video-player"></div>
    </div>
    <HomeContent />
  </div>
  <div class="circle1"></div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import HomeContent from './home-content/index.vue'
import { Right } from '@element-plus/icons-vue'

const input1 = ref('')
const startVideo = ref(false)

</script>
<style lang="scss" scoped>
@keyframes slowIn {
  from {
    opacity: 0;
    transform: translate(0, 50px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes slowDetailIn {
  from {
    opacity: 0;
    transform: translate(0, 50px);
  }

  50% {
    opacity: 0;
    transform: translate(0, 50px);
  }

  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  align-items: center;
  margin-top: 102px;
  margin-bottom: 143px;

  @media screen and (max-width:726px) {
    margin-top: 48px;
    margin-bottom: 60px;
  }

  h1 {
    color: transparent;
    font-size: 72px;
    font-weight: 700;
    background: linear-gradient(to right, #9ACB5A 0%, #FFFFFF 30%, #FFFFFF 70%, #9ACB5A 100%);
    background-clip: text;
    animation: alternate 2s slowIn;

    @media screen and (max-width:726px) {
      font-size: 36px;
      width: 196px;
      line-height: 43px;
    }
  }

  &-detail {
    font-size: 20px;
    color: #FFFFFF;
    text-align: center;
    width: 600px;
    line-height: 30px;
    animation: alternate 2s slowDetailIn;

    @media screen and (max-width:726px) {
      width: 327px;
      font-size: 12px;
      line-height: 18px;
    }
  }
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

:deep(.input) {
  border-radius: 8px;
  width: 360px;
  height: 48px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 76px;
  box-shadow: 0px 2px 16px #9ACB5AB2;

  @media screen and (max-width:726px) {
    width: 240px;
    height: 32px;
    margin-bottom: 36px;
  }

  .el-input__wrapper {
    background-color: #031E0B;
    box-shadow: none;
    color: #fff;
    font-size: 12px;
  }

  .el-input__wrapper.is-focus {
    box-shadow: 0px 2px 16px #9ACB5AB2;
  }

  .el-input__suffix {
    color: #fff;
    font-size: 20px;

    @media screen and (max-width:726px) {
      font-size: 16px;
    }
  }

  .el-input__inner {
    color: #fff;
    opacity: 0.7;
  }
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin: 0 $base-home-margin;
  margin-bottom: 158px;

  @media screen and (max-width:726px) {
    flex-direction: column;
    margin-left: 24px;
    margin-right: 24px;
    gap: 16px;
    margin-bottom: 96px;
  }

  &-item {
    height: 160px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 30px;

    @media screen and (max-width:726px) {
      padding: 18px;
      gap: 18px;
    }

    &>span:first-child {
      width: 102px;
      font-size: 32px;
      font-weight: 700;

      @media screen and (max-width:726px) {
        font-size: 14px;
        width: 45px;
      }
    }

    &>span:last-child {
      max-width: 400px;
      font-size: 16px;
      line-height: 24px;

      @media screen and (max-width:726px) {
        font-size: 12px;
        line-height: 18px;
        width: 233px;
      }
    }

  }

  &-item:first-of-type {
    background-color: #fff3;
    border-radius: 8px 0 0 8px;
  }

  &-item:last-of-type {
    background-color: #fff2;
    border-radius: 0 8px 8px 0;
  }

  @media screen and (max-width:726px) {
    .container-item {
      border-radius: 8px;
    }
  }
}



.video {
  position: relative;

  &-content {
    display: block;
    margin: 0 auto;
    width: 1096px;
    height: 600px;
    background-color: #ccc;
    border-radius: 20px;
    margin-bottom: 200px;

    &:hover {
      cursor: pointer;
    }

    @media screen and (max-width:726px) {
      width: 326px;
      height: 188px;
      margin-bottom: 96px;
    }
  }

  &-player {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    content: ' ';
    width: 74px;
    height: 74px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 6px #ffffff59;
    transition: all 0.3s;
    cursor: pointer;

    &:hover {
      width: 80px;
      height: 80px;
      box-shadow: 0 0 10px 10px #ffffff59;
    }
  }

  &-btn {
    z-index: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-17.5%, -50%);
    border-top: 12px solid transparent;
    border-right: 22px solid transparent;
    border-left: 22px solid #000;
    border-bottom: 12px solid transparent;
    border-radius: 4px;
    cursor: pointer;
  }

  &-btn:hover~&-player {
    width: 80px;
    height: 80px;
    box-shadow: 0 0 10px 10px #ffffff59;
  }

  @media screen and (max-width:726px) {
    .video-player {
      width: 40px;
      height: 40px;
      cursor: default;

      &:hover {
        width: 44px;
        height: 44px;
        box-shadow: 0 0 10px 10px #ffffff59;
      }
    }

    .video-btn {
      border-top: 8px solid transparent;
      border-right: 12px solid transparent;
      border-left: 12px solid #000;
      border-bottom: 8px solid transparent;
      cursor: default;
    }

    .video-btn:hover~.video-player {
      width: 44px;
      height: 44px;
      box-shadow: 0 0 10px 10px #ffffff59;
    }
  }
}
</style>
